package com.app.web.base.vo;

import java.io.Serializable;

import com.app.web.base.model.IdModel;
import com.app.web.base.model.Role;
import com.app.web.base.model.RoleResource;
import com.app.web.base.util.Permission;

public class RoleResourceVO extends IdModel implements Serializable {

	private static final long serialVersionUID = 1L;
	private Role role;
	private Permission permission;

	public RoleResourceVO() {
	}

	public RoleResourceVO(RoleResource roleResource) {
		this.role = roleResource.getRole();
		this.setId(role.getId());
		this.permission = new Permission(roleResource.getPermission());
	}

	public RoleResourceVO(Role role, Permission permission) {
		this.role = role;
		this.setId(role.getId());
		this.permission = permission;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Permission getPermission() {
		return permission;
	}

	public void setPermission(Permission permission) {
		this.permission = permission;
	}

}
